<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from WebDB.texi on 8 January 2003 -->

<LINK rel="stylesheet" href="WebDB.css" type="text/css">
<TITLE>The WebDB WWW Database Interface               - An active module based dbserver with interface to SQL remote DBs</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="WebDB_1.html">first</A>, <A HREF="WebDB_2.html">previous</A>, <A HREF="WebDB_4.html">next</A>, <A HREF="WebDB_9.html">last</A> section, <A HREF="WebDB_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC14" HREF="WebDB_toc.html#TOC14">An active module based dbserver with interface to SQL remote DBs</A></H1>

<P>
<STRONG>Version:</STRONG> 0.5#15 (2003/1/8, 13:32:17 CET)



<UL>
<LI><A HREF="WebDB_3.html#SEC15">Usage and interface (dbserver)</A>
<LI><A HREF="WebDB_3.html#SEC16">Documentation on exports (dbserver)</A>
<LI><A HREF="WebDB_3.html#SEC17">Documentation on multifiles (dbserver)</A>
<LI><A HREF="WebDB_3.html#SEC18">Documentation on internals (dbserver)</A>
<LI><A HREF="WebDB_3.html#SEC19">Version/Change Log (dbserver)</A>
</UL>



<H2><A NAME="SEC15" HREF="WebDB_toc.html#TOC15">Usage and interface (<CODE>dbserver</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

This module is typically compiled as an 
<A NAME="IDX13"></A>
<EM>active module</EM> (i.e., a 
<A NAME="IDX14"></A>
<EM>server</EM>). Clients can access this server by using the active modules usage convention: 

<PRE>
:- use_active_module(dbserver).
</PRE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<CODE>db_handler/3</CODE>, 
<CODE>db_maintenance/3</CODE>, 
<CODE>dying/2</CODE>, 
<CODE>die/1</CODE>.

<LI><EM>Multifiles:</EM>

<CODE>$is_persistent/2</CODE>, 
<CODE>persistent_dir/2</CODE>, 
<CODE>$is_sql_persistent/3</CODE>, 
<CODE>sql_persistent_location/2</CODE>, 
<CODE>relation/3</CODE>, 
<CODE>attribute/4</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<CODE>operators</CODE>, 
<CODE>pillow/http</CODE>, 
<CODE>pillow/html</CODE>, 
<CODE>persdb/persdbrt</CODE>, 
<CODE>persdb_mysql/persdbrt_mysql</CODE>, 
<CODE>det_hook/det_hook_rt</CODE>, 
<CODE>file_utils</CODE>, 
<CODE>lists</CODE>, 
<CODE>system</CODE>, 
<CODE>aggregates</CODE>, 
<CODE>dynamic</CODE>, 
<CODE>streams</CODE>, 
<CODE>read</CODE>, 
<CODE>write</CODE>, 
<CODE>terms</CODE>, 
<CODE>patterns</CODE>, 
<CODE>errhandle</CODE>.

<LI><EM>Internal (engine) modules:</EM>

<CODE>internals</CODE>, 
<CODE>arithmetic</CODE>, 
<CODE>atomic_basic</CODE>, 
<CODE>attributes</CODE>, 
<CODE>basic_props</CODE>, 
<CODE>basiccontrol</CODE>, 
<CODE>data_facts</CODE>, 
<CODE>exceptions</CODE>, 
<CODE>io_aux</CODE>, 
<CODE>io_basic</CODE>, 
<CODE>prolog_flags</CODE>, 
<CODE>streams_basic</CODE>, 
<CODE>system_info</CODE>, 
<CODE>term_basic</CODE>, 
<CODE>term_compare</CODE>, 
<CODE>term_typing</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC16" HREF="WebDB_toc.html#TOC16">Documentation on exports (<CODE>dbserver</CODE>)</A></H2>
<P>
<A NAME="IDX15"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>db_handler/3:</B>
<DD><A NAME="IDX16"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>db_handler(+Input,+Passwd,-Response)</CODE>

<UL>
<LI><EM>Description:</EM> Used to provide an interface to the service requested by the generic client. Once this predicate identifies the required service, it calls the particular predicate that implements it.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Input</CODE> is a Pillow dictionary.
 (<CODE>dic/1</CODE>)

<CODE>+Passwd</CODE> is an identifier for the client type.
 (<CODE>passwd/1</CODE>)

<CODE>-Response</CODE> is an HTML page.
 (<CODE>output_page/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX17"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>db_maintenance/3:</B>
<DD><A NAME="IDX18"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>db_maintenance(+Input,+Passwd,-Response)</CODE>

<UL>
<LI><EM>Description:</EM> According to the kind of user that calls this predicate, the system generates an interface which provides access to the whole of its services (in the administrator case) or to a restricted set of them (in the case of a common user). Typically used in installation time to automatically generate both common user and administrator front pages.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Input</CODE> is a Pillow dictionary.
 (<CODE>dic/1</CODE>)

<CODE>+Passwd</CODE> is an identifier for the client type.
 (<CODE>passwd/1</CODE>)

<CODE>-Response</CODE> is an HTML page.
 (<CODE>output_page/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX19"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>dying/2:</B>
<DD><A NAME="IDX20"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>dying(+ClientType,-Response)</CODE>

<UL>
<LI><EM>Description:</EM> Implements with <CODE>die</CODE> the stop the system service. Before having halted the database server through <CODE>die/1</CODE>, this predicate is used to produce a message, pointing out that the system is about to be halted. Only authorised clients can use this service.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+ClientType</CODE> is an identifier for the client type.
 (<CODE>passwd/1</CODE>)

<CODE>-Response</CODE> is an HTML page.
 (<CODE>output_page/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX21"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>die/1:</B>
<DD><A NAME="IDX22"></A>


<P>
Once the database has been updated in order to keep all the information in a consistant state, it halts the database server. Only authorised clients can use this service.


<P>
<STRONG>Usage:</STRONG> <CODE>die(ClientType)</CODE>

<UL>
<LI><EM>Description:</EM> Used to kill the server (active module) after updating the database.

<LI><EM>The following properties should hold at call time:</EM>

<CODE>ClientType</CODE> is an identifier for the client type.
 (<CODE>passwd/1</CODE>)
</UL>

</DL>



<H2><A NAME="SEC17" HREF="WebDB_toc.html#TOC17">Documentation on multifiles (<CODE>dbserver</CODE>)</A></H2>
<P>
<A NAME="IDX23"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>$is_persistent/2:</B>
<DD><A NAME="IDX24"></A>


<P>
No further documentation available for this predicate.


<P>
The predicate is <EM>multifile</EM>.


<P>
The predicate is of type <EM>data</EM>.


</DL>

<P>
<A NAME="IDX25"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>persistent_dir/2:</B>
<DD><A NAME="IDX26"></A>


<P>
No further documentation available for this predicate.


<P>
The predicate is <EM>multifile</EM>.


<P>
The predicate is of type <EM>data</EM>.


</DL>

<P>
<A NAME="IDX27"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>$is_sql_persistent/3:</B>
<DD><A NAME="IDX28"></A>


<P>
No further documentation available for this predicate.


<P>
The predicate is <EM>multifile</EM>.


</DL>

<P>
<A NAME="IDX29"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>sql_persistent_location/2:</B>
<DD><A NAME="IDX30"></A>


<P>
No further documentation available for this predicate.


<P>
The predicate is <EM>multifile</EM>.


<P>
The predicate is of type <EM>data</EM>.


</DL>

<P>
<A NAME="IDX31"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>relation/3:</B>
<DD><A NAME="IDX32"></A>


<P>
No further documentation available for this predicate.


<P>
The predicate is <EM>multifile</EM>.


<P>
The predicate is of type <EM>data</EM>.


</DL>

<P>
<A NAME="IDX33"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>attribute/4:</B>
<DD><A NAME="IDX34"></A>


<P>
No further documentation available for this predicate.


<P>
The predicate is <EM>multifile</EM>.


<P>
The predicate is of type <EM>data</EM>.


</DL>



<H2><A NAME="SEC18" HREF="WebDB_toc.html#TOC18">Documentation on internals (<CODE>dbserver</CODE>)</A></H2>
<P>
<A NAME="IDX35"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>passwd/1:</B>
<DD><A NAME="IDX36"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>passwd(X)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>X</CODE> is an identifier for the client type.

</UL>

</DL>

<P>
<A NAME="IDX37"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>dic/1:</B>
<DD><A NAME="IDX38"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>dic(X)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>X</CODE> is a Pillow dictionary.

</UL>

</DL>

<P>
<A NAME="IDX39"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>output_page/1:</B>
<DD><A NAME="IDX40"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>output_page(X)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>X</CODE> is an HTML page.

</UL>

</DL>



<H2><A NAME="SEC19" HREF="WebDB_toc.html#TOC19">Version/Change Log (<CODE>dbserver</CODE>)</A></H2>

<DL COMPACT>

<DT><STRONG>Version 0.5#15 (2003/1/8, 13:32:17 CET)</STRONG>
<DD>
Distribution updated for Windows (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#14 (2002/4/15, 11:27:6 CEST)</STRONG>
<DD>
Corrected bug at numbers representation (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#13 (2001/10/15, 17:37:55 CEST)</STRONG>
<DD>
Installation process and documentation updated (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#12 (2001/3/23, 17:48:27 CET)</STRONG>
<DD>
Distribution process revised (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#11 (1999/9/16, 12:52:5 MEST)</STRONG>
<DD>
Added lock file to prevent the system from being started several times (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#10 (1999/9/3, 10:58:16 MEST)</STRONG>
<DD>
Generic client interface added (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#8 (1999/5/31, 17:11:11 MEST)</STRONG>
<DD>
Readmes now automatically generated from documentation. (Manuel Hermenegildo)

<DT><STRONG>Version 0.5#7 (1999/4/23, 13:14:44 MEST)</STRONG>
<DD>
Naive graphical statistics added (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#6 (1999/4/21, 11:58:39 MEST)</STRONG>
<DD>
Text statistics added (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#5 (1999/4/20, 13:9:27 MEST)</STRONG>
<DD>
Infrastructure for system status info added (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#4 (1999/3/29, 19:57:47 MEST)</STRONG>
<DD>
HTML templates revised (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#3 (1999/3/23, 18:58:21 MET)</STRONG>
<DD>
Automatic link to remote SQL databases through ODBC added (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#2 (1999/2/10, 12:29:33 MET)</STRONG>
<DD>
Corrected lack of generality at the edit tables interface (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5#1 (1999/2/10, 12:28:51 MET)</STRONG>
<DD>
Complex query with restricted preds. completed (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5 (2001/2/14, 15:44:4 CET)</STRONG>
<DD>
Due to changes in persdb, static persistent predicates also need to be declared dynamically. (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.5 (1998/7/23, 13:26:0 MET DST)</STRONG>
<DD>
Started autodocumentation. (Manuel Hermenegildo)

<DT><STRONG>Version 0.1#1 (1998/3/18)</STRONG>
<DD>
Updated maintenance interface. (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.1 (1998/3/18)</STRONG>
<DD>
Added recursive treatment of relations (base case). (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.1 (1998/2/20)</STRONG>
<DD>
Started automatic documentation. (Jose Manuel Gomez Perez)

<DT><STRONG>Version 0.0 (1998/2/20)</STRONG>
<DD>
Started automatic documentation. (Jose Manuel Gomez Perez)
</DL>

<P><HR><P>
Go to the <A HREF="WebDB_1.html">first</A>, <A HREF="WebDB_2.html">previous</A>, <A HREF="WebDB_4.html">next</A>, <A HREF="WebDB_9.html">last</A> section, <A HREF="WebDB_toc.html">table of contents</A>.
</BODY>
</HTML>
